#include <REGX52.H>
#include <absacc.h>
#define Xdata XA0  XBYTE [0x5000]

unsigned char xdata *pi;
unsigned char idata *p;
unsigned int i;
unsigned char code seg[]={0x89,0x86,0xc7,0xc7,0xc0,0x00};
unsigned char wei[]={0x01,0x02,0x04,0x08,0x10,0x20};

void delay(unsigned int j)
{
	unsigned char k;
	while(j--)
	{
		for(k=0;k<120;k++);
	}
}

void main()
{

	while(1)
	{
			pi=0x4100;
	    p=0x300;
		for(i=0;i<6;i++)
		{
			*pi=seg[i];
			&pi++;
			delay(6);
		}
	}
}


//#include <REGX52.H>
//#define uchar unsigned char
//#define uint unsigned int
////uchar xdata *pi;
////uchar idata *p;
//uchar xdata xp[5]_at_ 0x5000;
//uchar i;
//uchar code seg[]={0x89,0x86,0xc7,0xc7,0xc0,0x00};
//uchar wei[]={0x01,0x02,0x04,0x08,0x10,0x20};

//void delay(uint j){
//	uchar k;
//  while(j--)
//{for(k=0;k<120;k++);}
//}
//void main(){
//	while(1){
////		pi=0x4100;
////		p=0x30;
//		for(i=0;i<6;i++){
//			xp[i]=seg[i];
//			P3=~wei[i];
//		  P1=xp[i];
//		  delay(6);
//			
////		*pi=seg[i];
////		*p=seg[i];
////		P3=~wei[i];
////		P1=*pi;
////		delay(6);
////		p++;
////		pi++;
//		}
//	}
//}